<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- 打印b以内偶数和
    <script>
        function aa(b){
        var a=0;
        for (i=0;i<=b;i+=1){
            if(i%2==0){
                a+=i;
            }
        }
        console.log(a);
    }
    aa(parseInt(prompt("输入一个数字")));
    </script> -->




    <!-- 交钱
    <script>
        var a = 100000;
        var b = 0;
        while (a > 5000) {
            if (a > 50000) {
                a = a - a * 0.05;
                console.log(a); b++;
            }
            if (a < 50000) {
                a = a - 5000;
                console.log(a); b++;
            }

        }
        console.log(b);
    </script> -->





    <!-- <script>
        function aa(num){
        var b = 0;
        var c = 0;
        for (a = 2; a <= num; a += 1) {
            if (a % 2 == 0) {
                b = b + (1 / a);
            } if (a % 2 != 0) {
                c = c + (1 / a);
            }
        }
        var i = 1 - b + c;
        console.log(i);
    }
    aa(parseInt(prompt("输入一个数字")));
    </script> -->




    <!-- 打印闰年 -->
    <!-- <script>
        function bb(ohyear, year) {
            var num = 0
            var sum = ""
            for (a = ohyear; a <= year; a++) {
                if (a % 4 == 0 && a % 100 != 0 || a % 400 == 0) {
                    num++
                    sum += a + "&nbsp;"
                    console.log(sum);
                    if (num % 4 == 0) {
                        document.write(
                            sum + '</br>')
                        sum = ""
                    }
                }
            }
        }
        bb(parseInt(prompt("输入起始年份")), parseInt(prompt("输入终止年份")))
    </script> --> 





    <!-- 打印三角形
<script>
    var b="";
    for(a=1;a<9;a++){
         b = b+ "*";
        console.log(b)
    }
</script> -->





    <!-- <script>
    var e=true;
    for(var a=100;a<=200;a++){
        for(var b=2;b<a;b++){
            if(a%b==0){
                e = false;
                break;
        }
        console.log(a)
    }
    }
    if(e){
        document.write(a);
    }
</script> -->



    <!-- 打印阶乘
<script>
    var c=0;
    for(var a=20;a>0;a--){
        for(var b=1;b<=a;b++){
            c+=a*b;
        }
    }
    document.write(c);
</script> -->


<!-- <script>
    for(var a=0;a<5;a++){
        for(var b=0;b<=9;b++){
            if(a==0&&b<5){ 
                document.write("*")
            }
            if(a==1&&b<6){7
                document.write("*")              
            }
            if(a==2&&b<7){ 
                document.write("*")            
            }
            if(a==3&&b<9){  
                document.write("*")            
            }
        }
        document.write("</br>")
    }
</script>
梯形 -->

</body>

</html>